PoC: A runner to load specs-based test cases from a central service and run it as part of the test automation#825
Conversation
bgavrilMS
reviewed
May 30, 2025
| try: | ||
| with requests.get(self.testcase_url) as response: | ||
| response.raise_for_status() | ||
| self.test_spec = yaml.safe_load(response.text) |
Member
There was a problem hiding this comment.
We discussed that the tests would be written in plain language (English)?
bgavrilMS
reviewed
May 30, 2025
| Interprets testcase file(s) to create and execute test cases using MSAL. | ||
|
|
||
| Initially created by the following prompt: | ||
| Write a python implementation that can read content from feature.yml, create variables whose names are defined in the "arrange" mapping's keys, and the variables' value are derived from the "arrange" mapping's value; interpret those value as if they are python snippet using MSAL library. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains a runner that can load specs-based test cases from a central service. The schema of those test cases will be defined elsewhere.
The test runner is then integrated as ONE test case, into the existing test automation. Its effect will be one of the following three outcomes.
tests/test_smile.py . [ xx%]That small dot after the file name means the multiple specs-based test cases as a whole passed.
We don't normally need to find that log because, if all other traditional existing test cases also pass, the build will simply end with a green status, as it normally would be.
tests/test_smile.py F [ xx%]That capital F after the file name means some of the multiple specs failed and, as a result, the entire test automation run will be marked as failed.
tests/test_smile.py s [ xx%]That lowercase s after the file name means the specs-based test cases were skipped.
This way, the occasional central test service maintenance will not block existing test automation.
The test runner currently supports test cases for managed identity v1. Going forward, this repo will receive more changes to the test runner to support more scenarios such as CCA. Actual specs-based test cases will continue to be hosted elsewhere centrally.